# coding: utf-8
# Project：PythonProject
# File：test2.py
# Author：罗若元
# Date ：2025/3/19 22:18
# IDE：PyCharm
import random

count = 5
win = 0
a = ["剪刀","石头","布"]
while count != 0:
    robot = random.choice(a)
    superman = input("请出拳：")
    if superman not in a:
        print("请重新输入")
    elif superman == robot:
        print("平局")
    elif (superman == "剪刀" and robot == "布") or (superman == "石头" and robot == "剪刀") or (
            superman == "布" and robot == "石头"):
        print("你赢了")
        win += 1
        count -= 1
    else:
        print("你输了")
        count -= 1

print("你赢了",win,"局")
